/**
 * 表名称：tc_common_search_history
 * 实体标识：ds_tbl:t_3b1f59efc75a4266b965716040296706
 * @param recordData
 * @returns {Promise<unknown>}
 */
function insertTcCommonSearchHistory(recordData) {

    const tcCommonSearchHistory = [
        ['search_number', `1`],
        ['search_type_name', `'法规查阅'`],
        ['search_type_id', `'1'`],
        ['create_time', 'NOW()'],
        ['human_id', 'USER_ID()']
    ];

    const formattedFields = tcCommonSearchHistory.map(([key, value]) => {
        return `'${key}',${value}`;
    });

    const tc_common_search_history = "ds_tbl:t_3b1f59efc75a4266b965716040296706";
    const insertSql = `INSERT('${tc_common_search_history}', [${formattedFields.join(',')}])`;
    console.log(insertSql);

    return new Promise((resolve, reject) => {
        api.EXEC_FORMULA(insertSql).then(res => {
            console.log(res);
            resolve(res);
        })
    })
}
